package com.logistics.delivery.entity.model;

import com.logistics.utils.bean.SaveBasic;
import lombok.Data;

@Data
public class DeliveryContainerSave extends SaveBasic {

    private Integer id;

    private String delivery;

    private String pick;

    private String container;

    private Integer containerLevel;

    private Boolean isEmpty;

    public static DeliveryContainerSave build(String pick,String container,Integer containerLevel,Boolean isEmpty){
        DeliveryContainerSave deliveryContainerSave = new DeliveryContainerSave();
        deliveryContainerSave.setPick(pick);
        deliveryContainerSave.setContainer(container);
        deliveryContainerSave.setContainerLevel(containerLevel);
        deliveryContainerSave.setIsEmpty(isEmpty);
        return deliveryContainerSave;

    }

    public static DeliveryContainerSave build(String container,Integer containerLevel,Boolean isEmpty){
        DeliveryContainerSave deliveryContainerSave = new DeliveryContainerSave();
        deliveryContainerSave.setContainer(container);
        deliveryContainerSave.setContainerLevel(containerLevel);
        deliveryContainerSave.setIsEmpty(isEmpty);
        return deliveryContainerSave;
    }

    public static DeliveryContainerSave build(String delivery, DeliverySave deliverySave, String container,Integer containerLevel,Boolean isEmpty){
        DeliveryContainerSave deliveryContainerSave = new DeliveryContainerSave();
        deliveryContainerSave.setDelivery(delivery);
        deliveryContainerSave.setContainer(container);
        deliveryContainerSave.setContainerLevel(containerLevel);
        deliveryContainerSave.setIsEmpty(isEmpty);
        deliveryContainerSave.setCreator(deliverySave.getCreator());
        deliveryContainerSave.setCreateTime(deliverySave.getCreateTime());
        deliveryContainerSave.setUpdateTime(deliverySave.getUpdateTime());
        deliveryContainerSave.setUpdater(deliverySave.getUpdater());
        deliveryContainerSave.setCreateOrgCode(deliverySave.getCreateOrgCode());
        deliveryContainerSave.setCreateDepCode(deliverySave.getCreateDepCode());
        return deliveryContainerSave;
    }

}
